|
Search, Search & HighLight, or Search & Replace ALLText has two built in search methods: FindPhrase and FindPhraseEX. FindPhrase searches for the next occurance of a given phrase in the document, without regard for the formatting. FindPhraseEX can be used to to search for text with specific formatting. In either case, the search begins at the current cursor position. Input parameters of this method include specification of the control to search, the text to search for, the search direction, case sensitivity, and (for FindPhraseEX) the formatting parameters for the text being sought. For a complete list of the parameters and sample code, refer to the technical descriptions section. Upon returning, the method sets the StartPos& and StopPos& functions to the location of the found phrase. The return value is True if the phrase is found, false otherwise. To Search and Replace, use the FindPhrase or FindPhraseEX methods, select the text which is found and set SelText or SelFText to overwrite the selection. A sample search and replace project is included in the samples directory FIND. Note: You may also use the FindHTag, FindNTag and FindPTag methods in ALLText HT/Pro to search for tagged phrases.
Description: The FindPhrase method searches for a specified text string within the control`s content. The search begins at the current caret position and proceeds forward or backward according to the Direction% parameter. If found, the method returns a positive long value or 0, designating the character count offset of the search string from the beginning of the ALLText content; else returns ATX_UNDEFINED. Syntax: Input Parameters: Example: Private Sub btnFindNext_Click() End Sub
Description: This is an enhanced search method supporting a search for text of specified format. Syntax: Return Values: Input Parameters: | ||||||||||||||||||||||||||||||||||||||||||||
Copyright© 2003 Bennet-Tec Information Systems, Inc. All rights reserved. |